home *** CD-ROM | disk | FTP | other *** search
- DEFINED LENGTH VS. LOCATED LENGTH IN VARIABLE FORMS
-
- DATE : 02/05/86 NUMBER : EX-2-4
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : Varforms SUBCATEGORY : Locations of Text Cols
-
- ******************************************************************************
-
- DESCRIPTION: I located a variable that I defined as TEXT 4 on my
- variable form. I only need one character as input so I located the E
- on top of the S in locate mode. I have other text immediately
- following the location. When I enter or edit that variable the text
- that is just to the right of the location is "grabbed" by the
- variable.
-
-
-
-
- EXPLANATION: There are two types of lengths for TEXT type variables
- in variable forms, the defined length and the located length. The
- located length is the determined by counting the S, the E, and all the
- spaces between the S and E. The defined length is the actual length
- that you gave the TEXT variable when you defined it.
-
- The located length can be shorter than the defined length or it can be
- the same size. If the located length is shorter, R:base "pulls" the
- difference from whatever happens to be on the form immediately
- following the E of the location.
-
- This can be useful when you want to concatenate a default value onto
- the end of whatever the operator enters. For example, you could
- automatically concatenate a state abreviation to the end of each city
- entered by the operator. If the you knew the state would always be MI
- for Michigan, you could avoid having the operator enter it each time
- by locating the CITY variable in 4 less positions than its definition
- would warrant.
-
- To make this work, define CITY with a length of 20 and locate it in 16
- positions. Then in the Edit mode of the FORMS command, enter the
- space, comma, and MI immediately following the E of the CITY location.
- The result will be similar to the following:
-
- S E ,MI
-
- Now everything the operator enters into CITY will have the ,MI
- automatically concatenated onto the end of it.
-
-
-
-
- SOLUTION: If you do not want R:base to grab text, make sure that the
- defined length of TEXT columns and the located length are the same or
- that only spaces follow the location.
-
- To correct your current variable form, use the R:base FORMS command.
- When prompted for the name of the form, enter the variable form name.
- Choose the locate option and name your variable. Change the defined
- length of the variable to exactly match the located length that you
- want. Finally, locate your Ss and Es to match the definition.
- ******************************************************************************
-
-
-
-
-
-
- HOW TO PRINT A PAGE FOOTER AT THE BOTTOM OF A PAGE
-
- DATE : 02/05/86 NUMBER : EX-2-5
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : Reports SUBCATEGORY : Placement of
- footer
-
- ************************************************************************************
-
- DESCRIPTION: If there are less than thirty lines of detail printed
- on a page, the page footer prints under the detail and not on the
- bottom of the page. How can I put the page footer at the foot of the
- page?
-
-
-
-
- EXPLANATION: This is the way the report writer normally prints page
- footers. However, there are several ways to work around this and
- actually print the page footer at the the bottom of the page. The
- solution presented here is one way.
-
-
-
-
- SOLUTION: See the article in the R:base EXCHANGE November 1985
- "Printing on Preprinted Forms" for a detailed explanation of this
- solution. This solution is outlined below:
-
- 1) First determine how many lines you would normally print on the page
- before the footer
-
- To do this, calculate the total number of lines on the page: 66
- Minus footer lines (10 in this example): 10
- --
- Leaving the number of lines to print before the footer: 56
-
- 2) Set lines (on reports main menu) to the answer from step 1 (56 in
- this example)
-
- 3) Define three report variables using the define mode of the REPORTS
- command.
-
- One for the printer control code for page size 56.
- One for the printer control code for eject.
- One for printer control code for page size 10.
-
- You will need to refer to your printer manual to locate the decimal
- codes you will need for this third step.
-
- 4) Locate the three report variables using the locate mode of the
- REPORTS command.
-
- Locate the variable for page size 56 at top of page header.
- Locate the variable for eject as 1st var in page footer.
- Locate the variable for page size 10 immediately following the
- eject variable in the footer.
-
- The footer will now be printed at the bottom of the page, and #page
- will count page numbers correctly.
- ************************************************************************************
-
-
-
-
-
-
-
- AUTOEXEC.BAT AND DATE AND TIME
-
- DATE : 02/05/86 NUMBER : EX-2-6
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : DOS SUBCATEGORY : AUTOEXEC.BAT
-
- ************************************************************************************
-
- DESCRIPTION: I put my CD and PATH commands in an AUTOEXEC.BAT file
- as I was told to do in the first chapter of the manual, and now my
- machine doesn't prompt me for the correct date and time. How can I
- get it to prompt me again?
-
-
-
-
- EXPLANATION: Some computer systems that automatically prompt for
- date & time when booted, stop prompting when there is an AUTOEXEC.BAT
- file. DOS assumes that If you want to be prompted for DATE and TIME,
- you will put the appropriate commands in the AUTOEXEC.BAT file.
-
-
-
-
- SOLUTION: Modify your AUTOEXEC.BAT file to include the DATE and TIME
- commands. Then every time you boot your system you will be prompted
- to enter DATE and TIME.
-
- For example, your AUTOEXEC.BAT file might contain the following lines:
-
- PATH C:\DBDIR;C:\SYSTEM
- CD C:\DBDIR\DATA
- DATE
- TIME
- ************************************************************************************
-
-
-
-
-
-
-
-
- SUPPRESSING ERROR MESSAGES WHEN DELETING A FILE
-
- DATE : 02/05/86 NUMBER : EX-2-8
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : MESSAGES SUBCATEGORY : SUPPRESSION
-
- ************************************************************************************
-
- DESCRIPTION: When I set messages and error messages off, then
- delete a file, I still get the message that the file is being deleted.
-
-
-
-
- EXPLANATION: Some commands print messages on the screen even though
- ERROR MESSAGES and MESSAGES have been set off. The commands that
- currently do this include DELETE, COPY, RENAME, CHANGE COLUMN, and
- EXPAND.
-
-
-
-
- SOLUTION: In your command file, you can work around this problem by
- sending the message into a file. This way the user will never see the
- message. For example, you could delete a file by using the following
- set of three commands before deleting the file:
-
- OUTPUT TRASHCAN
- DELETE filename
- OUTPUT SCREEN
-
- This will delete the file, but send the message to an output file
- named TRASHCAN rather than to the screen.
- ************************************************************************************
-
-
-
-
-
-
-
- WHEN DOLLAR SIGN IS SET TO BLANK, DOLLAR MATH IS INCORRECT
-
- DATE : 02/05/86 NUMBER : EX-2-9
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : MATH SUBCATEGORY : DOLLAR
-
- ******************************************************************************
-
- DESCRIPTION: When doing dollar arithmetic, I get unexpected results
- or I get the following error message :
-
- -ERROR- Expression cannot be evaluated
-
- This only occurs when doing dollar arithmetic using global variables.
-
-
-
-
- EXPLANATION: R:base does not handle dollar arithmetic correctly when
- the dollar sign is set to a blank. R:base does not look at the data
- type, it looks only at the value. Because there is no dollar sign on
- the number, dollar math is no longer possible. R:base gets confused
- because both the BLANK and DOLLAR are set to a blank. If you set
- DOLLAR to something that nothing else is set to (such as the pound
- sign #), then dollar math will work correctly.
-
- Any dollar value that contains a comma will not work at all. In
- addition, the following three examples also demonstrate what is
- happening:
-
-
- EXAMPLE ONE:
- This example shows normal dollar arithmetic. Here everything comes
- out the way you would expect because DOLLAR is set to the dollar sign:
-
-
- SET DOLLAR=$
- SHOW VARIABLE
- Variable = Value Type
- -------- ------------------------------ ----
- #DATE = 01/30/86 DATE
- #TIME = 8:43:21 TIME
- V1 = $100.00 DOLLAR
- V2 = $25.00 DOLLAR
-
-
-
- SET VARIABLE V3 TO .V1 + .V2
- SHOW VARIABLE
- Variable = Value Type
- -------- ------------------------------ ----
- #DATE = 01/30/86 DATE
- #TIME = 8:44:20 TIME
- V1 = $100.00 DOLLAR
- V2 = $25.00 DOLLAR
- V3 = $125.00 DOLLAR
-
-
- EXAMPLE TWO:
- This example shows the same calculation as example one but here DOLLAR
- is first set to a blank. Here the variable V3 is computed without an
- error message but it is given a REAL data type instead of DOLLAR.
-
- CLEAR V3
- SET DOLLAR=
- SET VARIABLE V3 = .V1 + .V2
- SHOW VARIABLE
- Variable = Value Type
- -------- ------------------------------ ----
- #DATE = 01/30/86 DATE
- #TIME = 8:45:31 TIME
- V1 = 100.00 DOLLAR
- V2 = 25.00 DOLLAR
- V3 = 125.00 REAL
-
-
- EXAMPLE THREE:
- This example demonstrates that if you first set DOLLAR to a blank and
- you preassign a DOLLAR data type to the V3 variable, then you get the
- error message and R:base will not perform the calculation.
-
- CLEAR V3
- SET DOLLAR=
- SET VARIABLE V3 DOLLAR
- SET VARIABLE V3 TO .V1 + .V2
- -ERROR- Expression cannot be evaluated
- SHOW VARIABLE
- Variable = Value Type
- -------- ----------------------------- -----
- #DATE = 01/30/86 DATE
- #TIME = 11:37:19 TIME
- V1 = 100.00 DOLLAR
- V2 = 25.00 DOLLAR
- V3 = -0- DOLLAR
-
-
- If you set DOLLAR back to the dollar sign, then the problems
- demonstrated by the second and third examples do not occur. Instead,
- you get accurate results like that in the first example.
-
-
-
-
- SOLUTION: Set the dollar sign back to $ with the command:
-
- SET DOLLAR=$
-
- before doing calculations, and set it to blank afterwards if
- necessary.
- ************************************************************************************
-
-
-
-
-
-
-
-
-
- MODIFYING LABELS.MAC
-
- DATE : 02/05/86 NUMBER : EX-2-10
- PRODUCT : R5K VERSIONS : 1.01
- CATEGORY : LABELS SUBCATEGORY : LABELS.MAC
-
- ************************************************************************************
-
- DESCRIPTION: I modified LABELS.MAC to include my column names, and I
- am running it from within my own command file as a macro (with a RUN
- LABELS.MAC command line), but it keeps dumping me to the R> when it is
- finished processing. It should be returning to the next line in my
- calling command file.
-
-
-
-
- EXPLANATION: LABELS.MAC has the following command as the final
- command line in the file:
-
- INPUT TERMINAL
-
- This terminates processing. The QUIT command and the INPUT SCREEN
- commands will also terminate the processing of the calling command
- file.
-
-
-
-
- SOLUTION: Change the last line of LABELS.MAC to say RETURN. Control
- will then return to your command file instead of the R> prompt.